package com.shqcjd.yunweiyanoperator.ui.adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shqcjd.yunweiyanoperator.R;
import com.shqcjd.yunweiyanoperator.model.pojo.RepairRecordBean;
import com.shqcjd.yunweiyanoperator.model.pojo.VideotapeBean;
import com.shqcjd.yunweiyanoperator.util.PrefUtils;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class VideotapeAdapter extends BaseQuickAdapter<VideotapeBean, VideotapeAdapter.ViewHolder> {
    private Context context;

    public VideotapeAdapter(@Nullable List<VideotapeBean> data, Context context) {
        super(R.layout.item_videotape, data);
        this.context = context;
    }

    @Override
    protected void convert(ViewHolder helper, VideotapeBean item) {
        helper.tvVideotapeName.setText(item.title);
        helper.addOnClickListener(R.id.tv_videotape_send);
        helper.addOnClickListener(R.id.rl_videotape);
    }

    class ViewHolder extends BaseViewHolder {
        @BindView(R.id.tv_videotape_name)
        TextView tvVideotapeName;
        @BindView(R.id.tv_videotape_send)
        TextView tvVideotapeSend;
        @BindView(R.id.rl_videotape)
        RelativeLayout rlVideotape;


        public ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }
    }
}
